# -*- coding: utf-8 -*-
import os.path



class HTML: #Gera os Ficheiros .html 


    def criar_html1(self):
        test=os.path.isfile("html/lista1.html")
        if test == False:
            file = open('html/lista1.html', "a")
            file.write('<html>\n')
            file.write('<head>\n')
            file.write('<title>LISTAS</title>\n')
            file.write('</head>\n')
            file.write('<body>\n')
            file.write('<h3> DADOS da Lista 1</h3>\n')
        else:
            file = open('html/lista1.html', "a")
            file.write('<h5> ----- // ----- //----- // -----</h5>\n')

    def escreve_html1(self,final):
        self.texto=final
        file = open('html/lista1.html', "a")
        file.write('<h5>{0}</h5>\n'.format(self.texto))
        
################################################################

    def criar_html2(self):
        test=os.path.isfile("html/lista2.html")
        if test == False:
            file = open('html/lista2.html', "a")
            file.write('<html>\n')
            file.write('<head>\n')
            file.write('<title>LISTAS</title>\n')
            file.write('</head>\n')
            file.write('<body>\n')
            file.write('<h3> DADOS da Lista 2</h3>\n')
        else:
            file = open('html/lista2.html', "a")
            file.write('<h5> ----- // ----- //----- // -----</h5>\n')

    def escreve_html2(self,final):
        self.texto=final
        file = open('html/lista2.html', "a")
        file.write('<h5>{0}</h5>\n'.format(self.texto))

################################################################

    def criar_html3(self):
        test=os.path.isfile("html/lista3.html")
        if test == False:
            file = open('html/lista3.html', "a")
            file.write('<html>\n')
            file.write('<head>\n')
            file.write('<title>LISTAS</title>\n')
            file.write('</head>\n')
            file.write('<body>\n')
            file.write('<h3> DADOS da Lista 3</h3>\n')
        else:
            file = open('html/lista3.html', "a")
            file.write('<h5> ----- // ----- //----- // -----</h5>\n')

    def escreve_html3(self,final):
        self.texto=final
        file = open('html/lista3.html', "a")
        file.write('<h5>{0}</h5>\n'.format(self.texto))
pass

    

